package com.gigi.exception;

import com.gigi.model.enums.ErrorCodeEnum;

/**
 * 自定义异常类
 *
 * @author Gigi
 */
public class BusinessException extends RuntimeException {

    private final String errCode;

    private final String errMessage;

    public BusinessException(ErrorCodeEnum errCodeEnum) {
        super(errCodeEnum.getErrDesc());
        this.errCode = errCodeEnum.getErrCode();
        this.errMessage = errCodeEnum.getErrDesc();
    }

    public String getErrCode() {
        return errCode;
    }

    public String getErrMessage() {
        return errMessage;
    }

}
